<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);
String baseInfoJson= (String)request.getAttribute("baseInfoJson");
String pressureSoreInfoJson= (String)request.getAttribute("pressureSoreInfoJson");
%>
<link rel="stylesheet" href="${basePath}assets/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="${basePath}assets/jquery-ui/jquery-ui.css"/>
<link rel="stylesheet" href="${basePath}assets/css/basic.css"/>
<link rel="stylesheet" href="${basePath}assets/css/medical_record/home_page.css"/>
<script type="text/javascript" src="${basePath}assets/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}assets/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="${basePath}assets/jquery-ui/jquery-ui.js"></script>
<script type="text/javascript" src="${basePath}/assets/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${basePath}assets/js/medical_record/edit_pressure_sore_info.js"></script>
<input type="hidden" id="basePath" value="${basePath }"/>
<form action="${basePath}medical_record/edit_home_page_pressure_sore" style="width: 100%;"
	method="post">
	<input type="hidden" name="visitGuid" value="${visitGuid }">
	<input type="hidden" id="pressureSoreRecordCount" value="0"/>
	<table width="100%" cellspacing="0" border="0" cellpadding="0">
			<tbody>
				<tr>
					<td align="left" colspan="6" class="dark">
						<div style="float:right">
							<input type="submit" value="保存" class="btn">&nbsp;
						</div></td>
				</tr>
				<tr>
					<td align="left" class="tdLabel_7">发生褥疮次数</td>
					<td class="tdLabel_8"><input type="text" name="pressureSoreTimes"
						class="input_box" style="width:150px"
						value="${pressureSoreInfo.pressureSoreTimes}">
					</td>
					<td class="tdLabel_8" colspan="4"></td>
				</tr>
				
			</tbody>
		</table>
		
		<table width="100%" cellspacing="0" border="0" cellpadding="0"
			id="pressureSoreRecords">
			<thead>
				<tr>
					<td colspan="6" style="border:none;">
						<div style="float:right">
							<input type="button" value="新增"
								onclick="addPressureSoreRecord()" class="btn">
	
						</div></td>
				</tr>
				<tr>
					<td class="tdLabel_4" width="20%">发生时间</td>
					<td class="tdLabel_4" width="15%">压疮来源</td>
					<td class="tdLabel_4" width="10%">压疮分期</td>
					<td class="tdLabel_4" width="30%">压疮部位</td>
					<td class="tdLabel_4" width="20%">填报时间</td>
					<td class="tdLabel_4" width="5%">操作</td>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
</form>
<div hidden="true">
	<table>
		<tr id="templatePressureSoreTr">
			<td class="tdLabel_8">
			
			<input name="pressureSoreRecords[0].occurDateTime" type="text"
				onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
				class="input_box">
			</td>
			<td class="tdLabel_8">
				<select name="pressureSoreRecords[0].pressureSoreCradleCode" class="pressureSoreCradleSelect">
					

				</select>
				<input type="hidden" name="pressureSoreRecords[0].pressureSoreCradleName">
			</td>
			<td class="tdLabel_8">
				<select name="pressureSoreRecords[0].pressureSorePhaseCode" class="pressureSorePhaseSelect">
					
				</select>
				<input type="hidden" name="pressureSoreRecords[0].pressureSorePhaseName">
			</td>
			<td class="tdLabel_8">
				<select name="pressureSoreRecords[0].pressureSorePartCode" style="width: 95%" class="pressureSorePartSelect">

					
				</select>
			
				<input type="hidden" name="pressureSoreRecords[0].pressureSorePartName">
			</td>
			<td class="tdLabel_8">
				
				<input name="pressureSoreRecords[0].registerDateTime" type="text"
				onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
				class="input_box"></td>
			<td align="center" class="tdLabel_8"><a class="int"
				onclick="deletePressureSoreRecord(this)">删除</a></td>
		</tr>
	</table>
</div>
<script>
	$(function(){
		var baseInfoJson= <%=baseInfoJson%>;
		
		//console.log(baseInfoJson);
		var pressureSoreInfoJson= <%=pressureSoreInfoJson%>;
		
		//console.log(pressureSoreInfoJson);
		initPage(baseInfoJson,pressureSoreInfoJson);
	})
</script>